A content delivery network (CDN) is a caching system comprising one or more cache appliances (e.g., computer servers or other computing machines) that are accessible to serve data to clients in a wide area network (WAN), for example, the Internet. A cache appliance can serve data temporarily stored therein on behalf of a data center or an application service system. Multiple cache appliances can be distributed in edge point of presences (PoPs). Popular content, e.g., a video or photo that is requested by many users, is cached as close to the users as possible. When a user requests content that is already cached, such access can be referred to as a “cache hit.” It is important to have a high cache hit rate (e.g., per item and per byte), because it lowers the latency of delivering the content to the user, and also saves the bandwidth to fetch the requested content all the way from a source data center.
In some cases, a cache appliance has both a primary data storage and a secondary data storage. For example, a cache appliance can have a random access memory (RAM) and a flash drive. The flash drive may have a much higher capacity than the RAM. In some cases, flash drives have inherent limitations to operate on a block basis. For example, a typical driver of a flash drive may expose 256 MB blocks to a processor of the cache appliance. A block in the flash drive, once written, would then need to be entirely erased before any byte in the block can be changed. The flash drive itself is not aware of data items/objects (e.g., an image file) it stores. Each block has a limited number of erase cycles before it wears out physically. A large number of writes/erase operations would slow down the latency to read items from the cache appliance.
The figures depict various embodiments of this disclosure for purposes of illustration only. One skilled in the art will readily recognize from the following discussion that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of embodiments described herein.